/**
 * 提现相关API接口
 * @author 王勇程 <laughskydragon@qq.com>
 */

import request from '@/utils/request'

// 获取提现配置
export function getConfig(data = {}) {
    return request({
        url: '/withdraw/getConfig',
        method: 'POST',
        data
    })
}

// 计算提现手续费
export function calculateFee(data = {}) {
    return request({
        url: '/withdraw/calculateFee',
        method: 'POST',
        data
    })
}

// 申请提现
export function apply(data = {}) {
    return request({
        url: '/withdraw/apply',
        method: 'POST',
        data
    })
}

// 获取用户提现记录
export function getUserWithdraws(data = {}) {
    return request({
        url: '/withdraw/getUserWithdraws',
        method: 'POST',
        data
    })
}

// 取消提现申请
export function cancel(data = {}) {
    return request({
        url: '/withdraw/cancel',
        method: 'POST',
        data
    })
}

// 获取提现状态
export function getStatus(data = {}) {
    return request({
        url: '/withdraw/getStatus',
        method: 'POST',
        data
    })
}

// 获取提现统计
export function getStats(data = {}) {
    return request({
        url: '/withdraw/getStats',
        method: 'POST',
        data
    })
}

// 提现综合页面数据
export function dashboard(data = {}) {
    return request({
        url: '/withdraw/dashboard',
        method: 'POST',
        data
    })
}